package cn.iocoder.yudao.module.wms.controller.admin.inventory.stock.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import cn.iocoder.yudao.module.wms.dal.dataobject.inventoryclassify.InventoryClassifyDO;
import cn.iocoder.yudao.module.wms.dal.dataobject.unit.UnitDO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "管理后台 - 存货档案 Response VO")
@Data
@ExcelIgnoreUnannotated
public class InventoryStockRespVO implements VO {

    @Schema(description = "存货id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32408")
    @ExcelProperty("存货id")
    private Long id;

    @Schema(description = "存货编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("存货编码")
    private String code;

    @Schema(description = "存货名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("存货名称")
    private String name;

    @Schema(description = "规格型号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("规格型号")
    private String specModel;

    @Schema(description = "存货分类id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31427")
    @Trans(type = TransType.SIMPLE, target = InventoryClassifyDO.class, fields = "name", ref = "classifyName")
    private Long classifyId;

    @Schema(description = "存货分类名称")
    @ExcelProperty("存货分类")
    private String classifyName;

    @Schema(description = "计量单位id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20436")
    @Trans(type = TransType.SIMPLE, target = UnitDO.class, fields = "name", ref = "unitName")
    private Long unitId;

    @Schema(description = "计量单位名称")
    @ExcelProperty("计量单位")
    private String unitName;

    @Schema(description = "税率")
    @ExcelProperty("税率")
    private Double taxRate;

    @Schema(description = "批次管理", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "批次管理", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.IS_BATCH)
    private Integer isBatch;

    @Schema(description = "品牌")
    @ExcelProperty("品牌")
    private String brand;

    @Schema(description = "现存量")
    @ExcelProperty("现存量")
    private String quantity;

}